package com.genokon.util;

import org.springframework.core.convert.converter.Converter;
import org.springframework.lang.NonNull;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @author by baichaoda
 * @date 2020/11/4 9:35
 */
public class StringToListConverter implements Converter<String, List<String>> {
    @Override
    public List<String> convert(@NonNull String source) {
        return new ArrayList<>(Arrays.asList(source.split(",")));
    }
}
